* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e1e;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    background: #2d2d30;
    padding: 10px 20px;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    color: #ffffff;
}

.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007acc;
    color: white;
}

.btn-primary:hover {
    background: #005a9e;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #117a8b;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    background: #007acc;
    color: white;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #005a9e;
}

.btn-small:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.theme-select {
    padding: 6px 10px;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    background: #2d2d30;
    color: white;
    cursor: pointer;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #3e3e42;
}

.right-panel {
    width: 400px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    background: #2d2d30;
    padding: 8px 15px;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}

.file-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #cccccc;
}

#codeEditor {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
}

.CodeMirror {
    height: 100% !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #3e3e42;
}

.output-content {
    flex: 1;
    padding: 15px;
    background: #1e1e1e;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-y: auto;
    white-space: pre-wrap;
}

.debug-panel {
    height: 300px;
    display: flex;
    flex-direction: column;
}

.debug-controls {
    display: flex;
    gap: 5px;
}

.debug-content {
    flex: 1;
    padding: 15px;
    background: #1e1e1e;
    overflow-y: auto;
}

.variables-section,
.breakpoints-section {
    margin-bottom: 20px;
}

.variables-section h4,
.breakpoints-section h4 {
    color: #cccccc;
    font-size: 13px;
    margin-bottom: 8px;
    border-bottom: 1px solid #3e3e42;
    padding-bottom: 4px;
}

.variables-list,
.breakpoints-list {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.variable-item {
    padding: 4px 0;
    border-bottom: 1px solid #2d2d30;
}

.variable-name {
    color: #9cdcfe;
    font-weight: bold;
}

.variable-value {
    color: #ce9178;
    margin-left: 10px;
}

.variable-type {
    color: #4ec9b0;
    font-size: 11px;
    margin-left: 5px;
}

.breakpoint-item {
    padding: 4px 0;
    color: #f14c4c;
    cursor: pointer;
}

.breakpoint-item:hover {
    background: #2d2d30;
}

.status-bar {
    background: #007acc;
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #2d2d30;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    color: white;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: white;
}

.modal-footer {
    margin-top: 20px;
    text-align: right;
}

.modal-footer .btn {
    margin-left: 10px;
}

/* 输出样式 */
.output-success {
    color: #4caf50;
}

.output-error {
    color: #f44336;
}

.output-info {
    color: #2196f3;
}

.output-warning {
    color: #ff9800;
}

/* 断点样式 */
.CodeMirror-gutter-wrapper {
    left: -30px !important;
}

.breakpoint {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f14c4c;
    margin-left: 2px;
}

.current-line {
    background: rgba(255, 255, 0, 0.1) !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e4e52;
}

/* 代码补全样式 */
.CodeMirror-hints {
    background: #2d2d30 !important;
    border: 1px solid #3e3e42 !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 13px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.CodeMirror-hint {
    color: #cccccc !important;
    padding: 6px 10px !important;
    border-bottom: 1px solid #3e3e42 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
}

.CodeMirror-hint:last-child {
    border-bottom: none !important;
}

.CodeMirror-hint-active {
    background: #007acc !important;
    color: white !important;
}

.CodeMirror-hint.cm-keyword {
    color: #569cd6 !important;
}

.CodeMirror-hint.cm-type {
    color: #4ec9b0 !important;
}

.CodeMirror-hint.cm-variable {
    color: #9cdcfe !important;
}

.CodeMirror-hint.cm-template {
    color: #dcdcaa !important;
}

.hint-description {
    font-size: 11px;
    color: #888888;
    margin-left: auto;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .right-panel {
        width: 100%;
        height: 300px;
    }
    
    .toolbar {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .CodeMirror-hints {
        font-size: 12px !important;
    }
    
    .CodeMirror-hint {
        padding: 4px 8px !important;
    }
}